#ifndef _PLAYER_CARD_LIST_H_
#define _PLAYER_CARD_LIST_H_
#include "cocos2d.h"
#include "cocos-ext.h"

USING_NS_CC;
USING_NS_CC_EXT;

class PlayerCardList : public CCLayer, public TableViewDataSource, public TableViewDelegate
{
public:
	PlayerCardList();
	~PlayerCardList();
	CREATE_FUNC(PlayerCardList);
	virtual bool init();
	virtual void scrollViewDidScroll(ScrollView* view);
	virtual void scrollViewDidSZoom(ScrollView* view);
	virtual CCSize tableCellSizeForIndex(TableView* view, ssize_t idx);
	virtual TableViewCell* tableCellAtIndex(TableView* view, ssize_t idx);
	virtual ssize_t numberOfCellsInTableView(TableView* view);
	virtual void tableCellTouched(TableView* table, TableViewCell* cell);
	virtual void tableCellHighlight(TableView* table, TableViewCell* cell);
	virtual void tableCellUnhighlight(TableView* table, TableViewCell* cell);

private:
	void ValueChanged(Ref * sender, Control::EventType controlEvent);
	CCNode* GetItemNode(int i);

	bool m_Table;
	bool m_Slider;
	CCSize size;
	int cellcount;

};


#endif